from mail import *
from saver import *
from config import *
import sys


def collect():
    check_base()
    connection = login(host, username, password)
    mail_list = get_mail_list(connection)
    get_attachment(connection, mail_list)
    count()

if __name__ == '__main__':
    collect()
